﻿using System;

namespace Ewk.Math.Algebra.Algorithms.Matrices
{
    /// <summary>
    /// Defines a computer that computes adjugates of matrices.
    /// </summary>
    /// <typeparam name="T">The element <see cref="Type"/> of the <see cref="Matrix{T}"/>.</typeparam>
    /// <remarks>
    /// This interface exists because there are probably more than one ways to compute an adjugate.
    /// </remarks>
    public interface IAdjugateComputer<T>
        where T : struct, IComparable, IFormattable, IConvertible, IComparable<T>, IEquatable<T>
    {
        /// <summary>
        /// Computes the adjugate of the specified <see cref="Matrix{T}"/>.
        /// </summary>
        /// <param name="matrix">The <see cref="Matrix{T}"/> to calculate the adjugate from.</param>
        /// <returns>A <see cref="Matrix{T}"/> that represents the adjugate of the specified <see cref="Matrix{T}"/>.</returns>
        Matrix<T> ComputeAdjugate(Matrix<T> matrix);
    }
}